package org.example.studentsdemo.course.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.example.studentsdemo.course.DTO.addStudentsToTeacherDTO;
import org.example.studentsdemo.course.entity.course;
import org.example.studentsdemo.utils.HttpResult;
import org.springframework.http.ResponseEntity;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;


public interface courseService {
    boolean saveBatch(Collection<course> entityList, int batchSize);

    boolean saveOrUpdateBatch(Collection<course> entityList, int batchSize);

    boolean updateBatchById(Collection<course> entityList, int batchSize);

    boolean saveOrUpdate(course entity);

    course getOne(Wrapper<course> queryWrapper, boolean throwEx);

    Optional<course> getOneOpt(Wrapper<course> queryWrapper, boolean throwEx);

    Map<String, Object> getMap(Wrapper<course> queryWrapper);

    <V> V getObj(Wrapper<course> queryWrapper, Function<? super Object, V> mapper);

    BaseMapper<course> getBaseMapper();

    Class<course> getEntityClass();

    ResponseEntity<HttpResult<List<course>>>  getCourseList();

   
    ResponseEntity<HttpResult<course>> getCourseById(Long id);

    ResponseEntity<HttpResult<course>> addCourse(course course);

    ResponseEntity<HttpResult<course>> updateCourse(course course);

    ResponseEntity<HttpResult<Boolean>> deleteCourse(Long id);
}
